<template>
	<view class="page">
		<view class="page-head">
			<image src="@/static/images/mine/login-bg.png" mode="" class="bg"></image>
			<view class="page-head-info">
				<view class="page-head-info-avatar flex j-center a-center">
					<u-avatar :src="app_user_info.headImg" size="130rpx"></u-avatar>
				</view>
				<view class="page-head-info-desc">
					<view class="page-head-info-desc-name">{{app_user_info.userName}}</view>
					<view class="page-head-info-desc-name1"></view>
					<view class="page-head-info-desc-name2">{{app_user_info.phone}}</view>
				</view>
			</view>
		</view>
		<view class="page-card">
			<view v-for="(item,index) in cardList" :key="index" class="page-card-item" @click="navigatorTo(item.toUrl)">
				<image :src="item.iconUrl" ></image>
				<div>{{ item.name }}</div>
				<u-icon name="arrow-right" color="#A6A6A6" size="14"></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				cardList:[
					{iconUrl:'/static/images/mine/gerenxinxi.png',name:'个人信息',toUrl:'/pages/client/mine/info/index'},
					// {iconUrl:'/static/images/mine/yinhangka.png',name:'银行卡管理'},
					// {iconUrl:'/static/images/mine/kefu.png',name:'在线客服'},
				]
			}
		},
		onLoad(){
			this.cacheHelper.updateUserInfo();
		},
		methods: {
			navigatorTo(data){
				uni.navigateTo({
					url:data
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.page-head{
		// background-image: url('/static/images/mine/login-bg.png');
		// background-size: 100% 100%;
		position: relative;
		height: 484rpx;
		width: 100%;
		overflow: hidden;
		.bg{
			width: 100%;
			height: 100%;
			position: absolute;
			bottom: 0;
			left: 0;
		}
		.page-head-info{
			display: flex;
			align-items: center;
			padding: 160rpx 40rpx 0 40rpx;
			z-index: 1;
			position: relative;
			.page-head-info-avatar{
				width: 130rpx;
				height: 130rpx;
				background-color: #fff;
				border-radius: 50%;
			}
			.page-head-info-desc{
				padding-left: 30rpx;
				color: #fff;
				&-name{
					font-size: 32rpx;
					font-family: PingFangSC, PingFang SC;
					font-weight: 600;
				}
				&-name1{
					font-size: 28rpx;
					font-family: PingFangSC, PingFang SC;
					font-weight: 500;
					padding: 10rpx 0;
				}
				&-name2{
					font-size: 24rpx;
					font-family: PingFangSC, PingFang SC;
					font-weight: 400;
				}
			}
		}
	}
	.page-card{
		background: #FFFFFF;
		border-radius: 20rpx;
		margin: 20rpx 30rpx 0 30rpx;
		padding: 0 40rpx;
		&-item{
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 36rpx 0;
			image{
				height: 60rpx;
				width: 60rpx;
				margin-right: 30rpx;
			}
			div{
				font-size: 32rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 400;
				flex: 1;
			}
		}
	}
</style>
